'use strict'
import { Text, View, ListView } from '../../component/index'
import globalStyle from '../css.css'
import style from './css.css'
import Descriptor from '../descriptor'
import Item from './Item'
import { dataSource } from './datas.json'

class Header extends React.Component {
  render () {
    return (
      <Text className={style.banner}>Header Banner</Text>
    )
  }
}

class ListViewHeader extends React.Component {
  render () {
    return (
      <View className={globalStyle.example}>
        <ListView
          Item={Item}
          dataSource={dataSource}
          itemKey="id"
          Header={Header}
          className={style.verticalScrollView}>
        </ListView>
        <Descriptor
          title="定制头部"
        >
        通过设置`Header`属性定制头部。
        </Descriptor>
      </View>
    )
  }
}
export default ListViewHeader
